package uba.algo3.tp3.tsp;

public class Pair
{
	int tam1;
	int tam2;
	
	public int getTam1()
	{
		return tam1;
	}
	public void setTam1(int tam1)
	{
		this.tam1 = tam1;
	}
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + tam1;
		result = prime * result + tam2;
		return result;
	}
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Pair other = (Pair) obj;
		if (tam1 != other.tam1)
			return false;
		if (tam2 != other.tam2)
			return false;
		return true;
	}
	public int getTam2()
	{
		return tam2;
	}
	public void setTam2(int tam2)
	{
		this.tam2 = tam2;
	}
	public Pair(int tam1, int tam2)
	{
		super();
		if(tam1 < tam2)
		{
			this.tam2 = tam1;
			this.tam1 = tam2;
		}
		else
		{
			this.tam1 = tam1;
			this.tam2 = tam2;
		}
	}
	
}
